package com.fate.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fate.constant.AreaConstant;
import com.fate.domain.Area;
import com.fate.mapper.AreaMapper;
import com.fate.service.AreaService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@CacheConfig(cacheNames = "com.fate.service.impl.AreaServiceImpl")
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements AreaService{
    /**
     * 全查询区域
     */
    @Override
    @Cacheable(key = AreaConstant.AREA_PREFIX)
    public List<Area> List() {
        List<Area> list = super.list();
        return list;
    }
}
